-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable on
key in join_asof
#916
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @raisadz , looks great! just one comment
narwhals/dataframe.py
Outdated
return super().join_asof( | ||
other, left_on=left_on, right_on=right_on, strategy=strategy | ||
) | ||
if left_on is not None and right_on is not None and on is not None: | ||
msg = "Either (`left_on` and `right_on`) or `on` keys should be specified." | ||
raise ValueError(msg) | ||
if left_on is not None and right_on is not None: | ||
return super().join_asof( | ||
other, left_on=left_on, right_on=right_on, strategy=strategy | ||
) | ||
elif on is not None: | ||
return super().join_asof(other, on=on, strategy=strategy) | ||
else: | ||
msg = "Either (`left_on` and `right_on`) or `on` keys should be specified." | ||
raise ValueError(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need updating, or can you also just defer to super().join_asof(
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, updated this part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @raisadz !
What type of PR is this? (check all applicable)
Related issues
Checklist
If you have comments or can explain your changes, please do so below.